﻿
Namespace LightSwitchApplication

    Public Class Application

        Private Sub ListAssets_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanAccessInitialScreen) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub NewAsset_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanInsertAsset) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListDisposedAssets_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewDisposedAsset) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListLeasedAssets_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewLeasedAsset) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListWarranties_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewWarrantyDetails) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        

        Private Sub ListCategory_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewCategories) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListDepartments_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewDepartments) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListEmployees_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewEmployees) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ListLocations_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewLocations) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub ManageAssetClass_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanViewAssetClass) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub SubsidiaryLedgerByDepartment_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanRunReports) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub SubsidiaryLedgerByLocation_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanRunReports) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub SubsidiaryLedgerByCategory_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanRunReports) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        Private Sub SubsidiaryLedgerByLastScanDate_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(Permissions.CanRunReports) Or Me.User.HasPermission(Permissions.ViewAdminScreen)
        End Sub

        
    End Class

End Namespace
